package com.gitee.chili.leisure.api.grade;

import com.gitee.chili.leisure.ResponseResult;
import com.gitee.chili.leisure.annotation.PathRestController;
import com.gitee.chili.leisure.domain.Grade;
import com.gitee.chili.leisure.service.IGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * GradeController
 *
 * @author week solider
 * @since 2020.09.03
 */
@PathRestController("/grade")
public class GradeController {

    @Autowired
    private IGradeService gradeService;

    @PostMapping("/gradeAll")
    public ResponseResult<List<Grade>> gradeAll() {

        List<Grade> all = gradeService.findAll();
        return ResponseResult.success(all);
    }

}
